import traceback

from commonDaoApi.CommonAppInfoDao import BaseAppInfoDao


class AInfoDao(BaseAppInfoDao):

    def queryAllAppInfo(self):
        all_info_map = {}
        try:
            sql = "select * from app_info"
            self.cursor.execute(sql)
            result = self.cursor.fetchall()
            for row in result:
                all_info_map[row[1]] = row[0]
            return all_info_map
        except:
            print( traceback.format_exc())
            return all_info_map

if __name__ == '__main__':
    a = AInfoDao()
    map = a.queryAllAppInfo()
    for key in map.keys():
        print(key)
        print(map[key])
    print(map.keys())

